import common from './common'
import paths from './paths'
const projectCycleService = {};
(function (service) {
  // 根据事项id获取项目阶段
  service.listProjectStageByParams = (params, data) => {
    return common.post(paths.projectCycle.listProjectStageByParams, params, data)
  }

  service.listProjectStageByBase = (params) => {
    return common.get(paths.projectCycle.listProjectStageByBase, params)
  }
  // 根据事项id获取项目阶段
  service.listStageByParams = (params) => {
    return common.post(paths.projectCycle.listStageByParams, params)
  }
  // 获取所有类型分组
  service.listBusinessStage = (params) => {
    return common.get(paths.projectCycle.listBusinessStage, params)
  }
  // 根据类型获取业务阶段树
  service.listBusinessStageTreeById = (params) => {
    return common.get(paths.projectCycle.listBusinessStageTreeById, params)
  }

  service.getProjectBaseInfoById = (params) => {
    return common.get(paths.projectCycle.getProjectBaseInfoById, params)
  }

  service.listBusinessStageTree = (params) => {
    return common.get(paths.projectCycle.listBusinessStageTree, params)
  }

  // 根据事项id获取各类阶段
  service.listMaterialStageByParams = (params) => {
    return common.post(paths.projectCycle.listMaterialStageByParams, params)
  }
})(projectCycleService)

export default projectCycleService
